<?php
/**
 *                 Created In 2018/6/22 下午5:44.
 * ==============================================================
 *    Copyright © 2018 by wangHu. All rights reserved.
 *
 *                This is not a free software
 *    Author authorization, please do not open source or modify.
 * ==============================================================
 */

/**
 * 验证手机号是否正确
 * @author honfei
 *
 * @param number $mobile
 */
function isMobile ( $mobile )
{
    if ( !is_numeric( $mobile ) ) {
        return FALSE;
    }

    return preg_match( '#^13[\d]{9}$|^14[5,7]{1}\d{8}$|^15[^4]{1}\d{8}$|^17[0,6,7,8]{1}\d{8}$|^18[\d]{9}$#' , $mobile ) ? TRUE : FALSE;
}